Skip to main content

Bulk Masking Data

This API masks multiple plaintext values across one or more masking functions in a single request. Each masking function is identified by its unique function_id, and the API returns the masked data for every plaintext item.


Endpoint Details

URL /v1/masking/bulk
Method POST
Authorization Bearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"data": [
{
"function_id": "4155dc15-a0a7-4b89-9fda-983beec2b077",
"items": [
{
"plaintext": "contoh123"
}
]
},
{
"function_id": "5b41077a-97d1-4bc7-adf4-124025a1758b",
"items": [
{
"plaintext": "contoh456"
}
]
}
]
}

Parameters

ParameterTypeDescription
dataArrayList of masking requests grouped by masking function
function_idUUIDUnique identifier of the masking function used to perform masking
itemsArrayList of plaintext values to be masked using the specified masking function
plaintextStringPlaintext data to be masked

Response

Here is an example response after the request has been successfully processed:

Response
{
"data": [
{
"function_id": "4155dc15-a0a7-4b89-9fda-983beec2b077",
"items": [
{
"plaintext": "contoh123",
"masked_data": "cont*****"
}
]
},
{
"function_id": "5b41077a-97d1-4bc7-adf4-124025a1758b",
"items": [
{
"plaintext": "contoh456",
"masked_data": "!!!to!!!6"
}
]
}
]
}

Field Descriptions

FieldTypeDescription
dataArrayList of masking results grouped by masking function
function_idUUIDUnique identifier of the masking function used
itemsArrayList of masking results
plaintextStringOriginal plaintext provided in the request
masked_dataStringMasked output generated from the corresponding plaintext

info
  • A valid Bearer Token is required to access this endpoint.
  • Each function_id must refer to an existing masking function.
  • A single request can include multiple masking functions, each containing one or more plaintext values to mask.